package com.etc.springbootssm.entity;

import java.io.Serializable;
import javax.persistence.*;

import lombok.Data;
import lombok.ToString;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 
 * @TableName sport
 */
@Table(name="sport")
@Data
@ToString
@Entity
public class Sport implements Serializable {
    /**
     * 
     */
    @Id
    @Column(name = "sport_id")
    private Integer sportId;

    /**
     * 
     */
    @Column(name = "sport_name")
    private String sportName;

    /**
     * 
     */
    @Column(name = "sport_img")
    private String sportImg;

    /**
     * 
     */
    private String typename;

    /**
     * 适宜时间
     */
    @Column(name = "suitable_time")
    private String suitableTime;

    /**
     * 适宜心率
     */
    @Column(name = "heart_rate")
    private String heartRate;

    /**
     * 适宜频率
     */
    private String frequency;

    /**
     * 适宜速度
     */
    @Column(name = "suitable_speed")
    private String suitableSpeed;

    /**
     * 疲劳度
     */
    private String fatigue;

    /**
     * 主观运动感觉
     */
    @Column(name = "subject_sport_feel")
    private String subjectSportFeel;

    /**
     * 运动功能
     */
    @Column(name = "effect_id")
    private Integer effectId;

    /**
     * 强度等级
     */
    @Column(name = "strength_range")
    private Integer strengthRange;

    /**
     * 时间等级
     */
    @Column(name = "time_range")
    private Integer timeRange;

    /**
     * 频率等级
     */
    @Column(name = "frequency_range")
    private Integer frequencyRange;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Sport other = (Sport) that;
        return (this.getSportId() == null ? other.getSportId() == null : this.getSportId().equals(other.getSportId()))
            && (this.getSportName() == null ? other.getSportName() == null : this.getSportName().equals(other.getSportName()))
            && (this.getSportImg() == null ? other.getSportImg() == null : this.getSportImg().equals(other.getSportImg()))
            && (this.getTypename() == null ? other.getTypename() == null : this.getTypename().equals(other.getTypename()))
            && (this.getSuitableTime() == null ? other.getSuitableTime() == null : this.getSuitableTime().equals(other.getSuitableTime()))
            && (this.getHeartRate() == null ? other.getHeartRate() == null : this.getHeartRate().equals(other.getHeartRate()))
            && (this.getFrequency() == null ? other.getFrequency() == null : this.getFrequency().equals(other.getFrequency()))
            && (this.getSuitableSpeed() == null ? other.getSuitableSpeed() == null : this.getSuitableSpeed().equals(other.getSuitableSpeed()))
            && (this.getFatigue() == null ? other.getFatigue() == null : this.getFatigue().equals(other.getFatigue()))
            && (this.getSubjectSportFeel() == null ? other.getSubjectSportFeel() == null : this.getSubjectSportFeel().equals(other.getSubjectSportFeel()))
            && (this.getEffectId() == null ? other.getEffectId() == null : this.getEffectId().equals(other.getEffectId()))
            && (this.getStrengthRange() == null ? other.getStrengthRange() == null : this.getStrengthRange().equals(other.getStrengthRange()))
            && (this.getTimeRange() == null ? other.getTimeRange() == null : this.getTimeRange().equals(other.getTimeRange()))
            && (this.getFrequencyRange() == null ? other.getFrequencyRange() == null : this.getFrequencyRange().equals(other.getFrequencyRange()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSportId() == null) ? 0 : getSportId().hashCode());
        result = prime * result + ((getSportName() == null) ? 0 : getSportName().hashCode());
        result = prime * result + ((getSportImg() == null) ? 0 : getSportImg().hashCode());
        result = prime * result + ((getTypename() == null) ? 0 : getTypename().hashCode());
        result = prime * result + ((getSuitableTime() == null) ? 0 : getSuitableTime().hashCode());
        result = prime * result + ((getHeartRate() == null) ? 0 : getHeartRate().hashCode());
        result = prime * result + ((getFrequency() == null) ? 0 : getFrequency().hashCode());
        result = prime * result + ((getSuitableSpeed() == null) ? 0 : getSuitableSpeed().hashCode());
        result = prime * result + ((getFatigue() == null) ? 0 : getFatigue().hashCode());
        result = prime * result + ((getSubjectSportFeel() == null) ? 0 : getSubjectSportFeel().hashCode());
        result = prime * result + ((getEffectId() == null) ? 0 : getEffectId().hashCode());
        result = prime * result + ((getStrengthRange() == null) ? 0 : getStrengthRange().hashCode());
        result = prime * result + ((getTimeRange() == null) ? 0 : getTimeRange().hashCode());
        result = prime * result + ((getFrequencyRange() == null) ? 0 : getFrequencyRange().hashCode());
        return result;
    }


}